#include <type_traits>
#include "src/base/overflowing-math.h"
#include "src/base/safe_conversions.h"
#include "src/codegen/cpu-features.h"
#include "src/common/globals.h"
#include "src/wasm/compilation-environment.h"
#include "test/cctest/cctest.h"
#include "test/cctest/wasm/wasm-run-utils.h"
#include "test/cctest/wasm/wasm-simd-utils.h"
#include "test/common/wasm/flag-utils.h"
#include "test/common/wasm/wasm-macro-gen.h"
namespace v8::internal::wasm {
template <typename T>
struct FMOperation { … };
large_n;
large_n;
large_n;
qfma_array;
template <typename T>
static constexpr base::Vector<const FMOperation<T>> qfma_vector() { … }
qfms_array;
template <typename T>
static constexpr base::Vector<const FMOperation<T>> qfms_vector() { … }
bool ExpectFused(TestExecutionTier tier) { … }
WASM_EXEC_TEST(F32x4Qfma) { … }
WASM_EXEC_TEST(F32x4Qfms) { … }
WASM_EXEC_TEST(F64x2Qfma) { … }
WASM_EXEC_TEST(F64x2Qfms) { … }
TEST(RunWasm_RegressFmaReg_liftoff) { … }
namespace {
template <typename T, size_t N = kSimd128Size / sizeof(T)>
std::array<uint8_t, kSimd128Size> as_uint8(const T* src) { … }
template <typename T, int kElems>
void RelaxedLaneSelectTest(TestExecutionTier execution_tier, const T v1[kElems],
const T v2[kElems], const T s[kElems],
const T expected[kElems], WasmOpcode laneselect) { … }
}
WASM_EXEC_TEST(I8x16RelaxedLaneSelect) { … }
WASM_EXEC_TEST(I16x8RelaxedLaneSelect) { … }
WASM_EXEC_TEST(I32x4RelaxedLaneSelect) { … }
WASM_EXEC_TEST(I64x2RelaxedLaneSelect) { … }
WASM_EXEC_TEST(F32x4RelaxedMin) { … }
WASM_EXEC_TEST(F32x4RelaxedMax) { … }
WASM_EXEC_TEST(F64x2RelaxedMin) { … }
WASM_EXEC_TEST(F64x2RelaxedMax) { … }
namespace {
template <typename IntType, typename FloatType>
typename std::enable_if<std::is_floating_point<FloatType>::value, bool>::type
ShouldSkipTestingConstant(FloatType x) { … }
template <typename IntType, typename FloatType>
void IntRelaxedTruncFloatTest(TestExecutionTier execution_tier,
WasmOpcode trunc_op, WasmOpcode splat_op) { … }
}
WASM_EXEC_TEST(I32x4RelaxedTruncF64x2SZero) { … }
WASM_EXEC_TEST(I32x4RelaxedTruncF64x2UZero) { … }
WASM_EXEC_TEST(I32x4RelaxedTruncF32x4S) { … }
WASM_EXEC_TEST(I32x4RelaxedTruncF32x4U) { … }
WASM_EXEC_TEST(I8x16RelaxedSwizzle) { … }
WASM_EXEC_TEST(I16x8RelaxedQ15MulRS) { … }
WASM_EXEC_TEST(I16x8DotI8x16I7x16S) { … }
WASM_EXEC_TEST(I32x4DotI8x16I7x16AddS) { … }
#ifdef V8_ENABLE_WASM_SIMD256_REVEC
TEST(RunWasm_F32x8Qfma_turbofan) { … }
TEST(RunWasm_F32x8Qfms_turbofan) { … }
TEST(RunWasm_F64x4Qfma_turbofan) { … }
TEST(RunWasm_F64x4Qfms_turbofan) { … }
template <typename T, int kElems>
void RelaxedLaneSelectRevecTest(const T l1[kElems], const T l2[kElems],
const T r1[kElems], const T r2[kElems],
const T s1[kElems], const T s2[kElems],
const T expected[2 * kElems],
WasmOpcode laneselect) { … }
TEST(RunWasm_I64x4RelaxedLaneSelect) { … }
TEST(RunWasm_I32x8RelaxedLaneSelect) { … }
TEST(RunWasm_I16x16RelaxedLaneSelect) { … }
TEST(RunWasm_I8x32RelaxedLaneSelect) { … }
TEST(RunWasm_I32x8DotI8x32I7x32AddS) { … }
TEST(RunWasm_I16x16DotI8x32I7x32S) { … }
TEST(RunWasmTurbofan_F32x8RelaxedMin) { … }
TEST(RunWasmTurbofan_F32x8RelaxedMax) { … }
TEST(RunWasmTurbofan_F64x4RelaxedMin) { … }
TEST(RunWasmTurbofan_F64x4RelaxedMax) { … }
#endif
}