Re-commit r330627 "[libcxx] implement <experimental/simd> declarations based on P0214R7."

There are 3 changes:
* Renamed genertor.pass.cpp to generator.pass.cpp
* Removed nothing_to_do.pass.cpp
* Mark GCC 4.9 as UNSUPPORTED for the test files that have negative
  narrowing conversion SFINAE test (see GCC PR63723).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@330655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Shen
2018-04-23 21:54:06 +00:00
parent 3d3af7d26a
commit 52cd8e497a
13 changed files with 1950 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++98, c++03
// <experimental/simd>
//
// [simd.casts]
// template <class T, class U, class Abi> see below simd_cast(const simd<U, Abi>&);
#include <experimental/simd>
#include <cstdint>
using namespace std::experimental::parallelism_v2;
static_assert(std::is_same<decltype(simd_cast<int32_t>(native_simd<int32_t>())),
native_simd<int32_t>>::value,
"");
static_assert(
std::is_same<decltype(simd_cast<int64_t>(fixed_size_simd<int32_t, 4>())),
fixed_size_simd<int64_t, 4>>::value,
"");
static_assert(std::is_same<decltype(simd_cast<fixed_size_simd<int64_t, 1>>(
simd<int32_t, simd_abi::scalar>())),
fixed_size_simd<int64_t, 1>>::value,
"");
static_assert(std::is_same<decltype(simd_cast<simd<int64_t, simd_abi::scalar>>(
fixed_size_simd<int32_t, 1>())),
simd<int64_t, simd_abi::scalar>>::value,
"");
int main() {}